<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
				xmlns:myns="http://www.sci-lab.it">
<xsl:output method="xml"
	encoding="UTF-8"
	omit-xml-declaration="yes"
    doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
    doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
	indent="yes"/>
<xsl:template match="/">
		  
<html xmlns="http://www.w3.org/1999/xhtml" lang="it" >
	<head>
			<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-15" />
			<meta http-equiv="Content-Script-Type" content="text/javascript" />
			<meta name="title" content="Home Page - Sci-Lab" />
			<meta name="author" content="Bonotto Sara, Crosato Emanuele, Tronchin Luca,  Vazzoler Raffaele" />
			<xsl:element name="meta">
				<xsl:attribute name="name">description</xsl:attribute>
				<xsl:attribute name="content">Risultati della ricerca di "<xsl:value-of select="$search" />" nel portale Sci-Lab.</xsl:attribute>
			</xsl:element>
			<meta name="keywords" content="Giornale, Notizie, Scienze, Articoli, Astronomia, Biologia, Chimica, Fisica, Informatica, Matematica, Scienze della natura" />
			<meta name="language" content="italian it" />

			<title>Risultati ricerca</title>
			
			<script type="text/javascript" src="../js/pageSize.js"></script>
			<script type="text/javascript" src="../js/utilities.js"></script>
			
			<link type="text/css" rel="stylesheet" href="../style/screen.css" media="screen" />
			<link type="text/css" rel="stylesheet" href="../style/print.css" media="print" />
	</head>

	<body onload="pageSize(); checkUserAgent('no');">
		<div id="contenitoreTutto">
			<div id="header">
					<div id="logo">SCI - LAB</div>
				</div>
				
				<div id="path">
					Ti trovi in: <a href="../transforms/home.html">Home</a> &gt;&gt; Risultati ricerca
				</div>
				
				<a href="#contentHome" class="hiddenLink"> Salta menu</a>
				<div id="contenitoreMenu"> 
					<div id="menu">
						<div class="center" > <strong>MENU</strong> </div>
			
						<div id="contentMenu">
							<dl>
								<dt class="marginBottom"><a href="../transforms/home.html" hreflang="it" title="Home page" accesskey="H" tabindex="1" >Home (h)</a></dt>
								
								<dt> <a href="../transforms/Astronomia1.html" hreflang="it" title="Astronomia" accesskey="a" tabindex="2"> Astronomia (a) </a> </dt>
								<dt> <a href="../transforms/Biologia1.html" hreflang="it" title="Biologia" accesskey="b" tabindex="3"> Biologia (b)</a> </dt>
								<dt> <a href="../transforms/Chimica1.html" hreflang="it" title="Chimica" accesskey="c" tabindex="4"> Chimica (c)</a> </dt>
								<dt> <a href="../transforms/Fisica1.html" hreflang="it" title="Fisica" accesskey="g" tabindex="5"> Fisica (g)</a> </dt>
								<dt> <a href="../transforms/Informatica1.html" hreflang="it" title="Informatica" accesskey="i" tabindex="6"> Informatica (i)</a> </dt>
								<dt> <a href="../transforms/Matematica1.html" hreflang="it" title="Matematica" accesskey="m" tabindex="7"> Matematica (m)</a> </dt>
								<dt class="marginBottom"> <a href="../transforms/Scienze%20della%20Natura1.html" hreflang="it" title="Scienze della Natura" accesskey="n" tabindex="8"> Scienze della natura (n)</a> </dt> 
								
								<dt><a href="../static_html/whatIsSciLab.html" hreflang="it" title="Sviluppatori" accesskey="s" tabindex="9" > Cos'&#232; Sci-Lab (s)</a></dt>
								<dt><a href="../static_html/workWithUs.html" hreflang="it" title="Lavora con noi" accesskey="l" tabindex="10" >Lavora per noi (l)</a></dt>
								<dt><a href="reservedArea.cgi" hreflang="it" title="Area riservata" accesskey="v" tabindex="11"> Area riservata (v)</a></dt>
								<dt><a href="../static_html/siteMap.html" hreflang="it" title="Mappa del sito" accesskey="z" tabindex="12" > Mappa del sito (z)</a></dt>
							</dl>
							<br />
							
							<form action="../cgi-bin/generateSearch.cgi" method="get">
								<div id="centerFind">
									<label>CERCA ARTICOLI </label><br />
									<input type="text" name="search" title="Inserisci una parola chiave" id="search" /> <br />
									<input type="submit" value="Cerca" />
								</div>
	 						</form>
	 						
						</div>
					</div>
				</div>
		
			<div id="contentHome">
				<div class="titleContent"><h1>RISULTATI RICERCA</h1></div>
				<xsl:for-each select="myns:articles/myns:article">
					
					<xsl:variable name="varTitle" select="myns:title"/>
					<xsl:variable name="titleLink">
						<xsl:call-template name="replaceCharsInString">
							<xsl:with-param name="stringIn" select="string($varTitle)"/>
							<xsl:with-param name="charsIn" select="' '"/>
							<xsl:with-param name="charsOut" select="'-'"/>
						</xsl:call-template>
					</xsl:variable>
					<xsl:variable name="titleLinkString" select="string($titleLink)"/>
					
					
					<div class="article">
						<xsl:element name="a">
							<xsl:attribute name="href">
								<xsl:value-of select="myns:subject"/>/<xsl:value-of select="$titleLinkString"/>.html</xsl:attribute>
							<span class="image">
								<xsl:element name="img">
									<xsl:attribute name="src">../img/<xsl:value-of select="myns:subject"/>.jpg</xsl:attribute>
									<xsl:attribute name="alt">immagine di <xsl:value-of select="myns:subject"/></xsl:attribute>
									<xsl:attribute name="height">80</xsl:attribute>
									<xsl:attribute name="width">100</xsl:attribute>
								</xsl:element>
							</span> 
						</xsl:element>
							<div class="contenitore">
								<div class="subject"> <xsl:value-of select="myns:subject"/></div>
								<div class="date"> <xsl:value-of select="myns:date"/> </div> <br/>
								<h2><xsl:element name="a">
									<xsl:attribute name="href">../transforms/<xsl:value-of select="myns:subject"/>/<xsl:value-of select="$titleLinkString"/>.html</xsl:attribute>
									<span class="title"><xsl:value-of select="myns:title"/></span>
								</xsl:element></h2>
								<div class="abstract"><xsl:value-of select="myns:abstract"/></div>
							</div>
					</div>
					
				</xsl:for-each>
			</div>
			
			<div id="login">
				<script type="text/javascript">
					is_logged("no","no","transforms/home.html");
				</script>
			</div>
		</div>
		<div id="footer">
			<div class="imageCertification">
				<img src="../img/css.gif" title="Validazione CSS" alt="Sito certificato secondo le regole css" width="100" height="32" />
			</div>
			<div class="imageCertification">
				<img src="../img/html.png" title="Validazione XHTML" alt="Sito certificato secondo le regole xhtml 1.0" width="100" height="32" />
			</div>
			<div class="imageCertification">
				<img src="../img/wai_aaa.gif" title="Validazione WCAG" alt="Livello di accessibilita' del sito AAA " width="100" height="32" />  
			</div>
		</div>
			
	</body>
</html>

</xsl:template>

<xsl:template name="replaceCharsInString">
  <xsl:param name="stringIn"/>
  <xsl:param name="charsIn"/>
  <xsl:param name="charsOut"/>
  <xsl:choose>
    <xsl:when test="contains($stringIn,$charsIn)">
      <xsl:value-of select="concat(substring-before($stringIn,$charsIn),$charsOut)"/>
      <xsl:call-template name="replaceCharsInString">
        <xsl:with-param name="stringIn" select="substring-after($stringIn,$charsIn)"/>
        <xsl:with-param name="charsIn" select="$charsIn"/>
        <xsl:with-param name="charsOut" select="$charsOut"/>
      </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
      <xsl:value-of select="$stringIn"/>
    </xsl:otherwise>
  </xsl:choose>
</xsl:template>

</xsl:stylesheet>